this.uiGroup.add_actor(global.window_group);
global.stage.remove_actor(global.overlay_group);
- this.overviewGroup = new St.Widget({ name: 'overviewGroup' });
- this.uiGroup.add_actor(this.overviewGroup);
global.stage.add_child(this.uiGroup);
+ this.overviewGroup = new St.Widget({ name: 'overviewGroup',
+ visible: false });
+ this.addChrome(this.overviewGroup);
+
this.screenShieldGroup = new St.Widget({ name: 'screenShieldGroup',
visible: false,
clip_to_allocation: true,
this._monitorsChanged();
},
- // This is called by Main after everything else is constructed;
- // it needs access to Main.overview, which didn't exist
- // yet when the LayoutManager was constructed.
+ // This is called by Main after everything else is constructed
init: function() {
- Main.overview.connect('showing', Lang.bind(this, this._overviewShowing));
- Main.overview.connect('hidden', Lang.bind(this, this._overviewHidden));
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
this._prepareStartupAnimation();
},
- _overviewShowing: function() {
+ showOverview: function() {
+ this.overviewGroup.show();
+
this._inOverview = true;
this._updateVisibility();
this._queueUpdateRegions();
},
- _overviewHidden: function() {
+ hideOverview: function() {
+ this.overviewGroup.hide();
+
this._inOverview = false;
this._updateVisibility();
this._queueUpdateRegions();
this._backgroundGroup = new Meta.BackgroundGroup();
Main.layoutManager.overviewGroup.add_child(this._backgroundGroup);
- this._backgroundGroup.hide();
this._bgManagers = [];
this._activationTime = 0;
this._overview.add_actor(this._coverPane);
this._coverPane.connect('event', Lang.bind(this, function (actor, event) { return true; }));
- this._stack.hide();
this._stack.add_actor(this._overview);
Main.layoutManager.overviewGroup.add_child(this._stack);
// show:
//
// Animates the overview visible and grabs mouse and keyboard input
- show : function() {
+ show: function() {
if (this.isDummy)
return;
if (this._shown)
return;
this._shown = true;
- if (!this._syncInputMode())
+ if (!this._syncGrab())
return;
+ Main.layoutManager.showOverview();
this._animateVisible();
},
//
// Disable unredirection while in the overview
Meta.disable_unredirect_for_screen(global.screen);
- this._stack.show();
- this._backgroundGroup.show();
this._viewSelector.show();
this._stack.opacity = 0;
this._animateNotVisible();
this._shown = false;
- this._syncInputMode();
+ this._syncGrab();
},
toggle: function() {
//// Private methods ////
- _syncInputMode: function() {
- // We delay input mode changes during animation so that when removing the
+ _syncGrab: function() {
+ // We delay grab changes during animation so that when removing the
// overview we don't have a problem with the release of a press/release
// going to an application.
if (this.animationInProgress)
return false;
}
}
- } else {
- global.stage_input_mode = Shell.StageInputMode.FULLSCREEN;
}
} else {
if (this._modal) {
Main.popModal(this._overview);
this._modal = false;
}
- else if (global.stage_input_mode == Shell.StageInputMode.FULLSCREEN)
- global.stage_input_mode = Shell.StageInputMode.NORMAL;
}
return true;
},
if (!this._shown)
this._animateNotVisible();
- this._syncInputMode();
+ this._syncGrab();
global.sync_pointer();
},
this._viewSelector.hide();
this._desktopFade.hide();
- this._backgroundGroup.hide();
- this._stack.hide();
+ this._coverPane.hide();
this.visible = false;
this.animationInProgress = false;
- this._coverPane.hide();
-
this.emit('hidden');
// Handle any calls to show* while we were hiding
if (this._shown)
this._animateVisible();
+ else
+ Main.layoutManager.hideOverview();
- this._syncInputMode();
+ this._syncGrab();
// Fake a pointer event if requested
if (this._needsFakePointerEvent) {